package com.lframework.xingyun.basedata.vo.member;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import com.lframework.starter.web.core.vo.BaseVo;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty;
import com.lframework.starter.web.core.components.validation.TypeMismatch;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.math.BigDecimal;

import lombok.Data;

@Data
public class CreateMemberLevelVo implements BaseVo, Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 等级
     */
    @ApiModelProperty(value = "等级", required = true)
    @NotNull(message = "请输入等级！")
    @TypeMismatch(message = "等级格式有误！")
    private Integer level;

    /**
     * 等级名称
     */
    @ApiModelProperty(value = "等级名称", required = true)
    @NotBlank(message = "请输入等级名称！")
    @Length(message = "等级名称最多允许20个字符！")
    private String levelName;

    /**
     * 升级方式
     */
    @ApiModelProperty(value = "升级方式", required = true)
    @NotNull(message = "请输入升级方式！")
    @TypeMismatch(message = "升级方式格式有误！")
    private Integer upgradeType;

    /**
     * 升级条件
     */
    @ApiModelProperty(value = "升级条件", required = true)
    @NotNull(message = "请输入升级条件！")
    @TypeMismatch(message = "升级条件格式有误！")
    private BigDecimal upgradeCondition;

    /**
     * 升级描述
     */
    @ApiModelProperty(value = "升级描述", required = true)
    @NotBlank(message = "请输入升级描述！")
    @Length(max = 65535, message = "升级描述最多允许65535个字符！")
    private String upgradeDesc;

    /**
     * 有效天数
     */
    @ApiModelProperty(value = "有效天数", required = true)
    @NotNull(message = "请输入有效天数！")
    @Min(value = 1, message = "有效天数必选大于0")
    private Integer effectiveDay;

    /**
     * 状态
     */
    @ApiModelProperty(value = "状态", required = true)
    @NotNull(message = "请输入状态！")
    @TypeMismatch(message = "状态格式有误！")
    private Boolean available;

}

